MOTOLT = {
	Name = "MOTOLT"
	Version = "0.0.1";
	VersionNumber = 00001;
	DBVersion = 1; -- Change if reset of DB is required.
};
MOTOLT_DB = {
};


-- ##
-- ## Set Up
-- ##

-- Set up the frame. Need a frame to track events.
PuGR["FRAME"], EVENTS = CreateFrame("Frame", nil, nil), {};

-- ## 
-- ## Functions
-- ##


-- ##
-- ## Event Handling
-- ##

function EVENTS:ADDON_LOADED(addon_name)
	-- Called once for each addon loaded, only want ours
	if addon_name ~= MOTOLT["Name"] then return end
	
	print( MOTOLT["Name"] .. " loaded");
	
end


-- Event handling stuff from http://www.wowwiki.com/Handling_events
-- Registers all the event handling functions above to the frame.
MOTOLT["FRAME"]:SetScript("OnEvent",
	function(self, event, ...)
		EVENTS[event](self, ...); -- call one of the functions above
	end
);
for k, v in pairs(EVENTS) do
	MOTOLT["FRAME"]:RegisterEvent(k); -- Register all events for which handlers have been defined
end